﻿using System;
using Ue.Infrastructure.DomainBase;

namespace Ue.Qcdz.Domain.Collectors
{
    /// <summary>
    /// 采集器
    /// </summary>
    public class Collector : EntityBase
    {
        public Collector(object key) : base(key) { }

        public string SiteName { set; get; }
        public string SiteUrl { set; get; }
        public string Outskirts { set; get; }
        public string ALink { set; get; }
        //
        public string NewsOutskirts { set; get; }
        public string Title { set; get; }
        public string Editor { set; get; }
        public string Content { set; get; }
        public string Reference { set; get; }
        public string ImageUrl { set; get; }
        public DateTime LastDate { set; get; }
        public string Remark { set; get; }
        public string Encode { set; get; }

        public int Status { set; get; }

        /// <summary>
        /// 改变状态
        /// </summary>
        public void ChangeStatus()
        {
            this.Status = this.Status == 1 ? 0 : 1;
        }
        /// <summary>
        /// 更改最近更新
        /// </summary>
        public void ChangeLastDate(DateTime dateTime)
        {
            this.LastDate = dateTime;
        }
    }
}